// pages/want/want.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    array1:['高','中','低'],
    value1: 0,

    multiArray0:[['数码通讯', '图书','生活','衣物'], ['手机', '相机', '笔记本', '键盘', '平板','一体机','耳机']],
    
    multivalue: [0, 0],
  },

  bindMultiPickerChange: function (e) {
    console.log('picker发送选择改变，携带值为', e.detail.value)
    this.setData({
      multivalue: e.detail.value
    })
  },
  bindMultiPickerColumnChange: function (e) {
    console.log('修改的列为', e.detail.column, '，值为', e.detail.value);
    var data = {
      multiArray0: this.data.multiArray,
      multivalue: this.data.multivalue
    };
    data.multivalue[e.detail.column] = e.detail.value;
    switch (e.detail.column) {
      case 0:
        switch (data.multivalue[0]) {
          case 0:
            data.multiArray0[1] = ['手机', '相机', '笔记本', '键盘', '平板','一体机','耳机'];
            break;
          case 1:
            data.multiArray0[1] = ['小说','文学','传记','科幻','惊悚','悬疑','散文','动漫'];
            break;
        }
        data.multivalue[1] = 0;
        data.multivalue[2] = 0;
        break;
     }
    this.setData(data);
  },

  bindPicker1Change: function(e) {
    this.setData({
        value1: e.detail.value
    })
  }
})